
extends public/layout

block content
    mixin item(catalog)
        div.catalog-item
            h2 <i class="vertical-separate"></i> #{catalog.name}
            each _ in catalog.children
                p
                    span #{_.name}：
                    mn.catalog-node
                        each __ in _.children
                            a.common(href='/catalog/show?_id=#{__._id}' target='_blank') #{__.name}

    div.container
        div.catalog-panel-left
            each catalog, index in catalogs
                if index % 2 == 0
                    +item(catalog)
        div.catalog-panel-right
            each catalog, index in catalogs
                if index & 0x01 == 1
                    +item(catalog)
